<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="<%=basePath%>res/css/right/style.css" rel="stylesheet"
	type="text/css" />
<script type="text/javascript"
	src="<%=basePath%>/res/js/jquery-1.11.1.min.js"></script>
<link href="<%=basePath%>res/js/jquery.uploadify/uploadify.css"
	rel="stylesheet" type="text/css" />
<script
	src="<%=basePath%>res/js/jquery.uploadify/jquery.uploadify.min.js"
	type="text/javascript"></script>
<title>创建档案</title>
<style type="text/css">
body {
	font-family: "黑体";
}

.container {
	width: 100%;
	margin: 0 auto;
}

a {
	display: inline-block;
	width: 50px;
	float: inherit;
}

.border_black {
	border: 1px solid black;
}

.table td {
	width: 25%;
	min-height: 40px;
	text-align: right;
}

.table {
	width: 100%;
}

.table tr:nth-child(odd) {
	background: #F4F4F4;
}

.table td:nth-child(even) {
	text-align: left;
}

div.wrapper {
	position: relative;
	width: 125px;
	height: 125px;
	border: 0;
	float:left;
	background-color: transparent;
	text-align: center;
}

</style>

<script type="text/javascript">

	$(document).ready(function(){
		var imags = "${report.attachmentUrl}";
		var strs = imags.split("|");
		for(i = 0; i < strs.length;i++){
			if(strs[i].length <=0 )
				continue;
			if(strs[i].length >= 0){
				var html = "<div id=\""+strs[i].substring(strs[i].lastIndexOf('/',strs[i].length))+"\" class=\"wrapper\"  style=\"cursor: pointer;\"><img style=\"width: 120px; height: 120px;margin:5px; background: #c2c2c2; cursor: pointer;\" src=\""+'<%=path%>'+strs[i]+"\"/><div onclick=\"deleImg(this)\" class=\"divdelete\" style=\"display: block;\"></div></div>";
				$("#imgContainer").append(html);
			}
		}
	});
	
	$(document).ready(function(){
		var imags = "${report.certificateImage}";
		var strs = imags.split("|");
		for(i = 0; i < strs.length;i++){
			if(strs[i].length <=0 )
				continue;
			if(strs[i].length >= 0){
				var html = "<div id=\""+strs[i].substring(strs[i].lastIndexOf('/',strs[i].length))+"\" class=\"wrapper\"  style=\"cursor: pointer;\"><img style=\"width: 120px; height: 120px;margin:5px; background: #c2c2c2; cursor: pointer;\" src=\""+'<%=path%>'+strs[i]+"\"/><div onclick=\"deleImg(this)\" class=\"divdelete\" style=\"display: block;\"></div></div>";
				$("#imgSign").append(html);
			}
		}
	});
	
</script>


</head>

<body style="background: #edf1fc">
	<div
		style="background: #4c9ee7; width: 100%; height: 30px; margin-bottom: 5px">
		<label
			style="width: auto; height: 30px; text-align: center; color: white; line-height: 30px; margin-left: 5px">应用中心>>品质档案>>档案详情</label>
	</div>
	<div style="margin-top: 10px;">
		<table class="gvtable">
			<thead>
				<tr>
					<th width="10%">生育期</th>
					<th width="30%">时间范围</th>
					<th width="10%">气象因子</th>
					<th width="10%">最适范围</th>
					<th width="20%">实测气象条件</th>
					<th width="10%">专家评级</th>
					<th width="10%">具体分值</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${list}" var="item">
					<tr title="bearInfo" id="${item.id }">
						<td rowspan="${item.grades.size() +1}">${item.name }</td>
						<td rowspan="${item.grades.size() +1}"><fmt:formatDate
								value="${item.start}" pattern="yyyy-MM-dd" />~<fmt:formatDate
								value="${item.end}" pattern="yyyy-MM-dd" /></td>
					</tr>
					<c:forEach items="${item.grades}" var="grade">
						<tr>
							<td>${grade.element}</td>
							<td>${grade.optimalRange }</td>
							<td>${grade.realCondition }</td>
							<td>${grade.gradeLevel }</td>
							<td>${grade.gradeValue }</td>
						</tr>
					</c:forEach>
				</c:forEach>
			</tbody>
		</table>
	</div>
	<div
		style="width: 100%; height: 30px; background: #0090d7; line-height: 30px;">
		<label
			style="margin: 10px; width: 100%; height: 30px; line-height 30px; color: white; size: +1.5"><b>品质档案报告</b></label>
	</div>
	<div style="min-height: 100px; margin-top: 10px; padding: 10px;">
		<table class="table">
			<tr>
				<td>产地名称:</td>
				<td>${apply.address }</td>
				<td>产品名称:</td>
				<td>${apply.productName }</td>
			</tr>
			<tr>
				<td>公司名称:</td>
				<td>${apply.unityName }</td>
				<td>认证等级:</td>
				<td>${report.approvelevel }</td>
			</tr>
			<tr>
				<td>受理机构:</td>
				<td>${report.headleAgency }</td>
				<td>认证机构:</td>
				<td>${report.approveAgency }</td>
			</tr>
			<tr>
				<td>认证结论:</td>
				<td>${report.approveConclusion }</td>
				<td>备注:</td>
				<td>${report.remark }</td>
			</tr>
			<tr>
				<td>专家签名照：</td>
				<td><%-- <img id="imgSign" src="<%=path%>${report.attachmentUrl }"
					width="120px" height="150px"> --%>
					<div id="imgContainer" style="height: auto;min-height: 150px">
					</div></td>
				<td>认证证书：</td>
				<td><%-- <img id="imgSign" src="<%=path%>${report.certificateImage }"
					width="120px" height="150px"> --%>
					<div id="imgSign" style="height: auto;min-height: 150px">
					</div></td>
			</tr>
			<tr>
				<td>认证报告：</td>
				<td><a style="width: auto" href="<%=path %>${report.certificateAttachment }" target="_blank">${report.ifOther }</a></td>
			</tr>
			<tr>
				<td>添加人:</td>
				<td colspan="3"><label>${report.addPerson }</label></td>
			</tr>
		</table>
		<c:forEach var="item" items="${other}">
			<table title="language" class="table">
				<tbody>
					<tr>
						<td style="text-align: center;" colspan="4">Language:${item.languageType}
						</td>
					<tr>
					<tr>
						<td>Place Of Production:</td>
						<td>${item.areaInfomation }</td>
						<td>Produce:</td>
						<td>${item.productInfomantion }</td>
					</tr>
					<tr>
						<td>Company:</td>
						<td>${item.producerImation }</td>
						<td>Grade:</td>
						<td>${item.approvelevel }</td>
					</tr>
					<tr>
						<td>Acceptance Mechanism:</td>
						<td>${item.headleAgency }</td>
						<td>Authentication Mechanism:</td>
						<td>${item.approveAgency}</td>
					</tr>
					<tr>
						<td>Authentication Conclusion:</td>
						<td>${item.approveConclusion}</td>
						<td>Remarks:</td>
						<td>${item.remark }</td>
					</tr>
				</tbody>
			</table>
		</c:forEach>
	</div>
	<center>
		<a class="btn_blue" href="<%=basePath%>quality_archive/list">返回</a>
	</center>
</body>

</html>
